<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/tags.jsp"%>

<script src="<%=request.getContextPath() %>/js/picture/picture.upload.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
	PictureEdit.API.brand_photographers = '<s:url namespace="/api" action="brand/photographers"/>';
//-->
</script>

<div class="row-fluid navbar">
	<div class="navbar-inner">
		<s:if test="@cn.talkimages.web.admin.constant.AdminConstDef$UpdateType@Add == updateType">
			<span class="brand">图片新建</span>
		</s:if>
		<s:else>
			<span class="brand">图片编辑</span>
		</s:else>
	</div>
</div>

<s:actionerror theme="bootstrap"/>

<div class="row-fluid row-fluid-grid">

	<div class="form-horizontal">
		<s:form namespace="/pic" action="save" method="post" enctype="multipart/form-data">

			<div class="control-group">
				<label class="control-label">标题(中文):</label>
				<div class="controls">
					<input name="titleZh" type="text" class="input-xlarge" value="<s:property value="titleZh"/>"/>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">标题(英文):</label>
				<div class="controls">
					<input name="titleEn" type="text" class="input-xlarge" value="<s:property value="titleEn"/>"/>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">品牌:</label>
				<div class="controls">
					<select id="brandSel" class="span3" name="brandId">
						<option value="">请选择品牌</option>
						<s:iterator var="brand" value="brands">
							<option value="<s:property value="#brand.id"/>" <s:if test="#brand.id == brandId">selected="selected"</s:if>><s:property value="#brand.name"/></option>
						</s:iterator>
					</select>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label span2">摄影师:</label>
				<div class="controls">
					<select id="photographerSel" class="span3" name="phogId">
						<s:set var="reqPhotographers" value="photographers" scope="request"></s:set>
						<s:include value="/WEB-INF/jsp/api/brand.photographers.jsp"/>
					</select>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">东方图片:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="orient" value="0" <s:if test="orient == '0' || orient == null">checked="checked"</s:if>/>
						否
					</label>
					<label class="radio inline">
						<input type="radio" name="orient" value="1" <s:if test="orient == '1'">checked="checked"</s:if>/>
						是
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">肖像权:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="portrait" value="0" <s:if test="portrait == '0' || portrait == null">checked="checked"</s:if>/>
						无模特儿肖像权
					</label>
					<label class="radio inline">
						<input type="radio" name="portrait" value="1" <s:if test="portrait == '1'">checked="checked"</s:if>/>
						有模特儿肖像权
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">物权:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="property" value="0" <s:if test="property == '0' || property == null">checked="checked"</s:if>/>
						无所有物权
					</label>
					<label class="radio inline">
						<input type="radio" name="property" value="1" <s:if test="property == '1'">checked="checked"</s:if>/>
						有所有物权
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">限制信息:</label>
				<div class="controls">
					<input name="stint" type="text" class="input-xxlarge" value="<s:property value="stint"/>"/>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">图片尺寸:</label>
				<div class="controls">
					<input name="size" type="text" class="input-large" value="<s:property value="size"/>"/>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">图片价格:</label>
				<div class="controls">
					<input name="price" type="text" class="input-large" value="<s:property value="price"/>"/>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">授权许可类型:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="license" value="1" <s:if test="license == '1' || license == null">checked="checked"</s:if>/>
						RM
					</label>
					<label class="radio inline">
						<input type="radio" name="license" value="2" <s:if test="license == '2'">checked="checked"</s:if>/>
						RF
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">创意图片:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="creative" value="1" <s:if test="creative == '1' || creative == null">checked="checked"</s:if>/>
						照片
					</label>
					<label class="radio inline">
						<input type="radio" name="creative" value="2" <s:if test="creative == '2'">checked="checked"</s:if>/>
						插图
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">图片颜色类型:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="pcolor" value="1" <s:if test="pcolor == '1' || pcolor == null">checked="checked"</s:if>/>
						彩色
					</label>
					<label class="radio inline">
						<input type="radio" name="pcolor" value="2" <s:if test="pcolor == '2'">checked="checked"</s:if>/>
						黑白
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">全景:</label>
				<div class="controls">
					<label class="radio inline">
						<input type="radio" name="panorama" value="0" <s:if test="panorama == '0' || panorama == null">checked="checked"</s:if>/>
						否
					</label>
					<label class="radio inline">
						<input type="radio" name="panorama" value="1" <s:if test="panorama == '1'">checked="checked"</s:if>/>
						是
					</label>
				</div>
			</div>
			
			<div class="control-group">
				<label class="control-label">图片关联文件:</label>
				<div class="controls">
					<input type="file" name="imgRelData"/>
				</div>
			</div>
			
			<div class="form-actions-embemed">
				<button type="submit" class="btn btn-primary">保存</button>
			</div>
			
			<input type="hidden" name="updateType" value="<s:property value="updateType"/>"/>
			<s:if test="@cn.talkimages.web.admin.constant.AdminConstDef$UpdateType@Edit == updateType">
				<input type="hidden" name="id" value="<s:property value="id"/>"/>
			</s:if>
		</s:form>
	</div>
	
</div>